﻿<Window x:Class="PizzaService.View.EditFoodWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Extra-Zutaten" Height="500" Width="600" Background="#FFA41B1B" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Styles\Styles.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="AUTO"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="AUTO"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <TextBlock Grid.Row="0" Grid.ColumnSpan="2"  HorizontalAlignment="Left" Text="{Binding Food.Name}" Style="{StaticResource CustomTextBlockStyle}" Margin="5"/>
        <TextBlock Grid.Row="0" Grid.ColumnSpan="2" HorizontalAlignment="Center" Text="{Binding Food.Size}" Style="{StaticResource CustomTextBlockStyle}" Margin="5"/>
        <TextBlock Grid.Row="0" Grid.ColumnSpan="2"  HorizontalAlignment="Right" Text="{Binding Food.AktuellerPizzaPreis, StringFormat=C}" Style="{StaticResource CustomTextBlockStyle}" Margin="5"/>
        <ListView Name="AddedExtraZutaten" Grid.Row="1" Grid.Column="0" Button.Click="AddedExtraZutaten_Click"  Opacity="1" FontSize="14" ItemsSource="{Binding Food.ExtraZutaten}" ItemContainerStyle="{StaticResource CustomItemContainerStlye}">
            <ListView.Background>
                <RadialGradientBrush>
                    <GradientStop Color="#FFCF5454"/>
                    <GradientStop Color="#FFA41B1B" Offset="1"/>
                </RadialGradientBrush>
            </ListView.Background>
            <ListView.View>
                <GridView ColumnHeaderContainerStyle="{StaticResource CustomHeaderStyle}">
                    <GridViewColumn Width="150" Header="Extra-Zutat" DisplayMemberBinding="{Binding Name}"/>
                    <GridViewColumn Width="100" Header="Preis" CellTemplate="{StaticResource RemoveExtraZutat}"/>
                </GridView>
            </ListView.View>
        </ListView>
        <ListView Name="AllExtraZutaten" Grid.Row="1" Grid.Column="1" Button.Click="AllExtraZutaten_Click"  Opacity="1" FontSize="14" ItemsSource="{Binding AllExtraZutaten}" ItemContainerStyle="{StaticResource CustomItemContainerStlye}">
            <ListView.Background>
                <RadialGradientBrush>
                    <GradientStop Color="#FFCF5454"/>
                    <GradientStop Color="#FFA41B1B" Offset="1"/>
                </RadialGradientBrush>
            </ListView.Background>
            <ListView.View>
                <GridView ColumnHeaderContainerStyle="{StaticResource CustomHeaderStyle}">
                    <GridViewColumn Width="150" Header="Extra-Zutat" DisplayMemberBinding="{Binding Name}"/>
                    <GridViewColumn Width="100" Header="Preis" CellTemplate="{StaticResource AddExtraZutat}"/>
                </GridView>
            </ListView.View>
        </ListView>
        <TextBlock Grid.Row="2" Grid.Column="0" HorizontalAlignment="Left" Text="Gesamtpreis der Zutaten" Width="200" Style="{StaticResource CustomTextBlockStyle}" Margin="5"/>
        <TextBlock Grid.Row="2" Grid.Column="0"  HorizontalAlignment="Right" Text="{Binding GesamtZutatenPreis, StringFormat=C}" Style="{StaticResource CustomTextBlockStyle}" Margin="5" TextAlignment="Center"/>
        <Button Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left" Content="Cancel" Style="{StaticResource CustomButtonStyle}" Margin="5" Click="BtnCancel_CLick"/>
        <Button Grid.Row="2" Grid.Column="1" HorizontalAlignment="Right" Content="OK" Style="{StaticResource CustomButtonStyle}" Margin="5" Click="BtnOK_Click"/>
    </Grid>
</Window>
